package com.liguangting.agentsflex.simple;

import com.agentsflex.core.document.Document;
import com.agentsflex.core.llm.Llm;
import com.agentsflex.core.store.VectorData;
import com.agentsflex.llm.spark.SparkLlm;
import com.agentsflex.llm.spark.SparkLlmConfig;
import com.liguangting.agentsflex.constant.ApiKeys;


/**
 * @author liguangting
 * @date 2024/7/5
 * @description
 */
public class EmbeddingTest {

    public static void main(String[] args) {
        SparkLlmConfig config = new SparkLlmConfig();
        config.setAppId(ApiKeys.SPARK_APP_ID);
        config.setApiKey(ApiKeys.SPARK_API_KEY);
        config.setApiSecret(ApiKeys.SPARK_API_SECRET);

        Llm llm = new SparkLlm(config);
        VectorData embeddings = llm.embed(Document.of("hello world"));
        System.out.println(embeddings);
    }
}
